﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DemoConstructor.Demo2
{
    /// <summary>
    /// Overload Construtor.
    /// </summary>
    class Demo2
    {
        public static void RunDemo2()
        {
            FirstClass theFirst = new FirstClass("","","");
        }
    }

    class FirstClass
    {
        /// <summary>
        /// Constructor.
        /// </summary>
        public FirstClass()
        {
            Console.WriteLine("Constructor with no param was called.");
        }

        /// <summary>
        /// Constructor.
        /// </summary>
        public FirstClass(string firstParam)
            :this()
        {
            Console.WriteLine("Constructor with one param was called.");
        }

        /// <summary>
        /// Constructor.
        /// </summary>
        public FirstClass(string firstParam, string secondParam)
            :this(firstParam)
        {
            Console.WriteLine("Constructor with two params was called.");
        }

        /// <summary>
        /// Constructor.
        /// </summary>
        public FirstClass(string firstParam, string secondParam, string thirdParam)
            :this(firstParam, secondParam)
        {
            Console.WriteLine("Constructor with three params was called.");
        }
    }
}
